﻿// LightNet - Lightweight .NET Framework
// Copyright (c) 2010 http://lightnet.codeplex.com

namespace System
{
    /// <summary>
    /// The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
    /// </summary>
    public class ArgumentNullException : ArgumentException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.ArgumentNullException" /> class.
        /// </summary>
        public ArgumentNullException()
            : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.ArgumentNullException" /> class with the name of the parameter that causes this exception.
        /// </summary>
        /// <param name="message">The name of the parameter that caused the exception.</param>
        public ArgumentNullException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.ArgumentNullException" /> class with a specified error message and the exception that is the cause of this exception.
        /// </summary>
        /// <param name="message">The error message that explains the reason for this exception.</param>
        /// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
        public ArgumentNullException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }
}
